package com.slg.android.manyanime.bean;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Darker on 2015/3/12.
 */
public class MyComment {
    /**
     * 图片查询id
     */
    private String mid;
    /**
     * 评论的内容
     */
    private String content;
    /**
     * 图片请求地址
     */
    private String mpic;
    /**
     * 评论时间
     */
    private String create_time;
    /**
     * 图片名称
     */
    private String mname;
    /**
     * 点赞数量
     */
    private String good_num;
    /**
     * 评论数量
     */
    private String reply_num;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getMpic() {
        return mpic;
    }

    public void setMpic(String mpic) {
        this.mpic = mpic;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getMname() {
        return mname;
    }

    public void setMname(String mname) {
        this.mname = mname;
    }

    public String getGood_num() {
        return good_num;
    }

    public void setGood_num(String good_num) {
        this.good_num = good_num;
    }

    public String getReply_num() {
        return reply_num;
    }

    public void setReply_num(String reply_num) {
        this.reply_num = reply_num;
    }

    public String getMid() {
        return mid;
    }

    public void setMid(String mid) {
        this.mid = mid;
    }

    //todo 解析
    public void parseJSON(JSONObject json) {
        if (json != null) {
            try {
                mid = json.getString("mid");
                content = json.getString("content");
                good_num = json.getString("good_num");
                reply_num = json.getString("reply_num");
                create_time = json.getString("create_time");
                mname = json.getString("mname");
                mpic = json.getString("mpic");

            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
    }
}
